package com.kelvin.paopao.injector.modules;

import com.kelvin.paopao.adapter.MyRequestPeisongAdapter;
import com.kelvin.paopao.injector.PerFragment;
import com.kelvin.paopao.module.peisong.mypeisong.myrequestpeisong.MyRequestPeisongFragment;
import com.kelvin.paopao.module.peisong.mypeisong.myrequestpeisong.MyRequestPeisongPresenter;

import dagger.Module;
import dagger.Provides;

/**
 * Created by MCK on 2017/5/23.
 */

@Module
public class MyRequestPeisongModule {
    private MyRequestPeisongFragment mView;

    public MyRequestPeisongModule(MyRequestPeisongFragment view) {
        this.mView = view;
    }

    @PerFragment
    @Provides
    public MyRequestPeisongPresenter providePresenter() {
        return new MyRequestPeisongPresenter(mView);
    }


    @PerFragment
    @Provides
    public MyRequestPeisongAdapter provideAdapter() {
        return new MyRequestPeisongAdapter(mView.getContext());
    }


}
